package sctu.edu.java.year2016.team07.nieying.practice.Review;

/**
 * Created by Administrator on 2016/6/15 0015.
 */
public class Table {
    public static void main(String[] args){
        int sum=0;
        String flag="从1到100之间连续整数的和是：";
        for(int i=1;i<=100;i++){
            sum=sum+i;
            if(sum>1000){
                flag="从1+到"+i+"之间连续整数的和是：";
                break;
            }

        }
        System.out.println(flag+sum);
    }
}
